package Main;

import com.updateNew.MyIsif;
import org.come.init.CheckUpdate;
import org.come.log.LanderJFrame;

import java.io.*;

public class main {
    public static CheckUpdate checkUpdate;
    public static LanderJFrame landerJFrame;
    public static void main(final String[] args){
        MyIsif.setStyle(getStyle());
        landerJFrame = new LanderJFrame();
        final Thread thread = new Thread((Runnable)landerJFrame);
        thread.start();
    }
    public static String getStyle() {
        String url = "";
        String ur = System.getProperty("user.dir");

        String filePath = ur + "/resource/other/style.txt";
        FileInputStream fin = null;
        try {
            fin = new FileInputStream(filePath);
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        InputStreamReader reader = new InputStreamReader(fin);
        BufferedReader buffReader = new BufferedReader(reader);
        String strTmp = "";
        try {
            while ((strTmp = buffReader.readLine()) != null) {
                url = strTmp;
            }
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        try {
            buffReader.close();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return url;
    }
}
